package com.example.blockbreaker;

import android.content.Context;
import android.content.Intent;

import java.util.Random;

public class CravingHelper {
    private static final String[] DISTRACTIONS = {
            "喝一杯水",
            "做10个深呼吸",
            "散步5分钟",
            "嚼口香糖",
            "给朋友打电话",
            "做几个俯卧撑"
    };

    private static final String[] MOTIVATIONAL_QUOTES = {
            "每一分钟不吸烟，你的身体都在恢复!",
            "你已经走了这么远，不要放弃!",
            "烟瘾只会持续几分钟，但戒烟的成就感会持续一生!",
            "你不是在放弃吸烟，而是在获得健康、自由和金钱!"
    };

    public static String getRandomDistraction() {
        Random random = new Random();
        return DISTRACTIONS[random.nextInt(DISTRACTIONS.length)];
    }

    public static String getRandomMotivationalQuote() {
        Random random = new Random();
        return MOTIVATIONAL_QUOTES[random.nextInt(MOTIVATIONAL_QUOTES.length)];
    }

    public static void startBreathingExercise(Context context) {
        Intent intent = new Intent(context, BreathingActivity.class);
        context.startActivity(intent);
    }
}